#pragma once
#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <list>
#include <set>
#include <utility>
#include <sstream>

#include <cv.h>
#include <cxcore.h>
#include <highgui.h>

#include "Tools.h"

using namespace std;

namespace Tools
{
	class Graph
	{
	public:
		Graph(void);
		Graph(set< CvPoint,ImagePointComp > list, IplImage *thinned_image);
		~Graph(void);
		vector<CvPoint> get_branch_points(int x1, int y1);
		vector<CvPoint> find_neighbours(int x1, int y1);
	private:
		vector<Vertex> node_list;
		void build_Graph(IplImage *thinned_image);
		Vertex* get_vertex(int x, int y); 
	};
}